import request from '@/router/axios'
import store from '@/store'
export const xw_tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  viewBtn: false,
  editBtn: false,
  delBtn: false,
  emptyBtn:false,
  align: 'center',
  selection: true,
  reserveSelection:false,
  addBtn: false,
  height: 450,
  column: [{
    fixed: true,
    label: '主键',
    prop: 'id',
    span: 24,
    hide: true
  },
  //   {
  //   hide: false,
  //   width: 55 ,
  //   label: '线路名称',
  //   prop: 'lineCode',
  //   type: 'select',
  //   search: true,
  //   cascaderItem: ["stationCode"],
  //   props: {
  //     label: 'name',
  //     value: 'code'
  //   },
  //   dicUrl: "/check/check/getLineLists?userCode="+ store.getters.userInfo.userCode,
  //   display: true // 动态显隐控制不能删除
  // }, {
  //   hide: false,
  //   label: '站点名称',
  //   width: 55,
  //   prop: 'stationCode',
  //   type: 'select',
  //   search: true,
  //   dicFlag: false,
  //   props: {
  //     label: 'name',
  //     value: 'code'
  //   },
  //   dicUrl: "/check/check/getStationLists?userCode="+ store.getters.userInfo.userCode + "&lineCode={{key}}",
  //   display: true// 动态显隐控制不能删除
  // },
   {
    label: '部门',
    width: 70,
    prop: 'deptName',
    search: false,
    hide: false,
    type:'input',
  },{
    label: '发单时间',
    prop: 'transactionTime',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    width: 90,
    type: 'date',
    hide: false,
    search: true
  },{
    label: '要求回复时间',
    prop: 'hopeReturnTime',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    width: 120,
    type: 'date',
    hide: false,
    search: false
  },{
    hide: false,
    width: 70 ,
    search: true,
    label: '事务类别',
    prop: 'transactionType',
    type: 'select',
    props: {
      label: 'label',
      value: 'value'
    },
    dicUrl: "/check/check/getSysDictItemList?type=TRANSACTION_TYPE",
    display: true // 动态显隐控制不能删除
  },{
    label: '设备类型',
    width: 70,
    prop: 'deviceType',
    type: 'select',
    formatter:function(row, value , label, column){
	  if(value!="" && value!='undefined' && value!=undefined){		 
	    return value == 1?'BOM':'TVM';
	  }
	  return "";
    },   
    dicData: [{
      label: '',
      value: ''
    },{
      label: 'TVM',
      value: '0'
    }, {
      label: 'BOM',
      value: '1'
    }],
    search: true,
    hide: false
  }, {
    label: '设备编号',
    width: 90,
    prop: 'deviceNo',
    search: false,
    hide: false,
  }, {
    label: '卡号',
    width: 70,
    prop: 'cardNumber',
    search: true,
    hide: false,
  }, {
    label: '票种',
    width: 70,
    prop: 'ticketType',
    type: 'select',
    formatter:function(row, value , label, column){
      if(value!="" && value!='undefined' && value!=undefined){
	     return value == 1?'其他票种':'长安通';
	  }
	  return "";
	  
    },
    dicData: [{
      label: '',
      value: ''
    },{
      label: '长安通',
      value: '0'
    }, {
      label: '其他票种',
      value: '1'
    }],
    search: false,
    hide: false,
  }, {
    label: '其他票种',
    width: 70,
    prop: 'otherTicketName',
    search: false,
    hide: false,
  }, {
    hide: false,
    label: '开始时间',
    prop: 'beginTime',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    type:'date',
    width: 90,
    search: false
  }, {
    hide: false,
    label: '结束时间',
    prop: 'endTime',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    type:'date',
    width: 90,
    search: false
  },{
    label: '申请原因',
    width: 70,
    prop: 'applyCase',
    search: false,
    hide: false,
  },  {
    label: '车站排查经过及结果',
    width: 180,
    prop: 'applyDetail',
    search: false,
    hide: true,
  },  {
    label: '反馈结果',
    width: 70,
    prop: 'returnData',
    search: false,
    hide: false,
  },  {
    hide: false,
    label: '反馈时间',
    prop: 'returnTime',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    type:'date',
    search: true
  }, {
    hide: false,
    width: 70,
    label: '反馈人',
    prop: 'returnCreatorName',
    type: 'input',
    search: false
  }, {
    hide: false,
    label: '反馈人员工号',
    prop: 'returnCreatorCode',
    width: 120,
    search: false
  }, {
    hide: true,
    display: false,
    width: 120,
    label: '车站上传附件',
    prop: 'stationFile',
    formatter:function(row, value , label, column){
      return value == '[]'?'':value;
    },
    search: false
  }, {
    width: 120,
    hide: true,
    display: false,
    label: '线网上传附件',
    prop: 'lineFile',
    formatter:function(row, value , label, column){
      return value == '[]'?'':value;
    },
    search: false
  }, {
    hide: false,
    label: '提交状态',
    prop: 'applyStatus',
    type: 'select',
    search: true,
    formatter:function(row, value , label, column){
      return value == 1?'已提交':'未提交';
    },
    dicData: [{
      label: '未提交',
      value: 0
    }, {
      label: '已提交',
      value: 1
    }],
    width: 70,
  }]
}
export function get_xw_SwStApplyNetworkCheckPassengerAffairs(param) {
  return request({
    url: '/check/xw/get_xw_SwStApplyNetworkCheckPassengerAffairs',
    method: 'post',
    params: param
  })
}

export function submit_xw_SwStApplyNetworkCheckPassengerAffairs(param) {
  return request({
    url: '/check/xw/submit_xw_SwStApplyNetworkCheckPassengerAffairs',
    method: 'post',
    //params: param,
    data: param
  })
}

export function delete_xw_SwStApplyNetworkCheckPassengerAffairs(param) {
  return request({
    url: '/check/xw/delete_xw_SwStApplyNetworkCheckPassengerAffairs',
    method: 'post',
    params: param
  })
}

export function getSysUserToLine(param) {
  return request({
    url: '/check/check/getSysUserToLine',
    method: 'post',
    params: param
  })
}

